home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 2003 June / macformat-130.iso / mac / Reviewed⁄Demos / Spearhead Demo / demota / pak1.pk3 / models / weapons / thompsonsmg.tik < prev    next >
Encoding:
Text File  |  2002-10-21  |  8.7 KB  |  328 lines

  1. TIKI
  2. setup
  3. {
  4.     scale 0.52            // Set default scale to 16/30.5 since world is in 16 units per foot and model is in cm's
  5.     path models/weapons/ThompsonSMG
  6.     skelmodel ThompsonSMG.skd
  7.     surface ThompsonSMG1 shader ThompsonSMG
  8.     surface ThompsonSMG2 shader ThompsonSMG
  9.     surface Clip shader ThompsonSMG
  10.     surface site shader thompsite
  11. }
  12.  
  13. $define sounddir sound/weapons
  14.  
  15. init
  16. {
  17.     server
  18.         {
  19.  
  20.     //========================================//
  21.     //        WEAPON NAME          //
  22.     //========================================//
  23.  
  24.         classname        Weapon
  25.         weapontype        smg
  26.         name            "Thompson"
  27.         rank            310 310
  28.  
  29.     //========================================//
  30.     //        WEAPON ACCURACY       //
  31.     //========================================//
  32.  
  33. //        Thompson SMG: Max Eff. Range is 50 yds with a muzzle velocity of 805 ft/s. (.45 ACP round)
  34.  
  35.         sp bulletrange        4000             //the range at which bulletspread is applied
  36.         sp bulletspread        45 45 72 72     //minpitch minyaw maxpitch maxyaw original 55 55 72 72
  37.         sp firespreadmult    0.08 0.35 200 0.25  //add falloff cap maxtime
  38.  
  39.         dm bulletrange        4000
  40.         dm bulletspread        40 40 50 50            //32 32 50 50         //26 26 48 48        //50 50 120 120        //53 53 70 70    //45 45 72 72
  41.         dm firespreadmult    0.3 0.6 150 0.25        //0.08 0.35 200 0.25    //0.3 0.8 200 0.4 original
  42.  
  43.         realism bulletrange        4000
  44.         realism bulletspread        19 19 50 50            //32 32 50 50         //26 26 48 48        //50 50 120 120        //53 53 70 70    //45 45 72 72
  45.         realism firespreadmult    0.3 0.6 150 0.25        //0.08 0.35 200 0.25    //0.3 0.8 200 0.4 original
  46.  
  47.     //========================================//
  48.     //        DAMAGE / RATE OF FIRE      //
  49.     //========================================//
  50.  
  51.         sp bulletdamage        35            //damage per round original 25
  52.         dm bulletdamage        25            //26    
  53.         sprealism bulletdamage    55            //26    
  54.         dmrealism bulletdamage    30
  55.  
  56.         sp firedelay        0.086 //(700 rpm)
  57.         dm firedelay        0.086
  58.         realism firedelay        0.086
  59.  
  60.     //========================================//
  61.     //        PLAYER MOVEMENT          //
  62.     //========================================//
  63.  
  64.         sp movementspeed         1.0    
  65.         dm movementspeed        0.96
  66.         realism movementspeed        0.96
  67.  
  68.     //========================================//
  69.     //        RIFLE BUTT / SECONDARY FIRE//
  70.     //========================================//
  71.  
  72.         secondary firetype            melee
  73.         secondary ammotype            none
  74.         secondary ammorequired        0
  75.         secondary meansofdeath        bash
  76.         secondary bulletknockback    50
  77.         secondary quiet
  78.  
  79.         sp secondary bulletrange    64
  80.         sp secondary bulletdamage    60
  81.  
  82.         dm secondary bulletrange    96
  83.         dm secondary bulletdamage    60
  84.  
  85.         realism secondary bulletrange    96
  86.         realism secondary bulletdamage    60
  87.  
  88.     //========================================//
  89.     //        AMMO              //
  90.     //========================================//
  91.  
  92.         firetype        bullet
  93.         ammotype        "smg"
  94.         meansofdeath    bullet
  95.         bulletcount        1
  96.         clipsize        30
  97.         ammorequired    1
  98.  
  99.         sp startammo    30
  100.         dm startammo    180
  101.         sprealism startammo    30
  102.         dmrealism startammo    120
  103.  
  104.         // Additional DM Loadout
  105.         dm additionalstartammo "grenade" 2
  106.         dm additionalstartammo "smokegrenade" 1
  107.         dm startitem "items/binoculars.tik"
  108.  
  109.         // Additional DM Realism Loadout
  110.         dmrealism additionalstartammo "grenade" 2
  111.         dmrealism additionalstartammo "smokegrenade" 1
  112.         dmrealism startitem "items/binoculars.tik"
  113.  
  114.     //========================================//
  115.     //        CROSSHAIR, ZOOM, TRACERS  //
  116.     //========================================//
  117.  
  118.         sp tracerfrequency     3
  119.         dm tracerfrequency     0
  120.         sprealism tracerfrequency     3
  121.         dmrealism tracerfrequency     0
  122.  
  123.         crosshair        1
  124.  
  125.     //========================================//
  126.     //        SOUND, AI, OTHER      //
  127.     //========================================//
  128.  
  129.  
  130.         pickupsound        thompson_snd_pickup
  131.         ammopickupsound    thompson_snd_pickup_ammo
  132.         noammosound        thompson_snd_noammo
  133.  
  134.         // Holstering info
  135. //        holstertag        "Bip01 Spine2"
  136. //        holsteroffset    "8.0 -7.75 6.5"
  137. //        holsterangles    "0 185 -25"
  138. //        holsterScale    1.0
  139.         
  140.         // AI animation group info
  141.         weapongroup        thompson
  142.         airange            short
  143.  
  144.         // this is attached to the player during reload
  145.         cache models/ammo/thompson_clip.tik
  146.     }
  147.     client
  148.     {
  149.         cache tracer.spr
  150.         
  151.         cache muzsprite.spr
  152.         cache models/ammo/pistolshell.tik
  153.     }
  154. }
  155.  
  156. animations
  157. {
  158.     idle    ThompsonSMG.skc
  159.     reload    ThompsonSMG.skc        crossblend 0.1
  160.     {
  161.         server
  162.         {
  163.             9 surface Clip +nodraw
  164.             47 surface Clip -nodraw
  165.             last idle
  166.         }
  167.         client
  168.         {
  169.             entry sound thompson_snd_reload
  170.         }
  171.     }
  172.     secondaryfire     ThompsonSMG.skc
  173.     {
  174.         server
  175.         {
  176.             entry shoot secondary
  177.         }
  178.     }
  179.     fire    ThompsonSMG.skc
  180.     {
  181.         server
  182.         {
  183.             entry shoot
  184.         }
  185.         client
  186.         {
  187.             entry stopaliaschannel thompson_snd_fire
  188.             entry sound thompson_snd_fire
  189.  
  190.             // By now, the server has already fired the weapon, so it's
  191.             // ok to apply the view kick apon entry to avoid problems
  192.             // with multiple application on single frame animations.
  193.  
  194.             ////////////////////////////////////////////////////////////////////////////////////////
  195.             // View Kicking
  196.             //
  197.             // View Kicking works based on the assumptions that every weapon has its own tendencies to kick in
  198.             // a paticular fashion. In MOH we call then scatter patterns. Currently we have 2 scatter patterns which
  199.             // will be explained.
  200.             // Scatter Patterns:
  201.             // "V" - the cone. The longer you shoot the more random your shots will be in the horizontal axis.
  202.             // "T" - the T shape. The gun has a tendancy to push in a paticular direction.
  203.             //
  204.             //
  205.             //                     +-------------------------------------------- Scatter Pitch Min
  206.             //                      |    +--------------------------------------- Scatter Pitch Max
  207.             //                      |    |       +------------------------------- Scatter Yaw Min
  208.             //                     |    |       |   +--------------------------- Scatter Yaw Max
  209.             //                     |    |       |   |     +--------------------- The Recentering speed in fraction per second
  210.             //                      |    |       |   |     |    +---------------- The Scatter Pattern
  211.             //                      |    |       |   |     |    |     +---------- The absolute pitch min/max
  212.             //                      |    |       |   |     |    |     |  +------- The absolute yaw min/max
  213.             //                      |    |       |   |     |    |     |  | +----- This is the pitch at which you loose all
  214.             //                      |    |       |   |     |    |     |  | |      control of the weapon and its behavior is
  215.             //                      |    |       |   |     |    |     |  | |      purely random.
  216.             //                V    V       V   V     V    V     V  V V
  217.             entry viewkick         -1.58 -1.58  -0.16 -0.16 0.9   "V"   8.5 8.6 16.0
  218.  
  219. //            entry viewkick         -2.25 -2.25  -0.16 -0.16 1   "V"   8.5 8.6 16.0 (original)
  220.  
  221.  
  222.             // muzzle flash
  223.             entry tagdlight tag_barrel 0.25 0.2 0.15 150 0.11
  224. // Commented out to prevent hitting the max anim command error
  225.             entry tagspawnlinked tag_barrel
  226.             (
  227.                 model muzsprite.spr
  228.                 color 1.00 1.00 1.00
  229.                 scale 0.30
  230.                 life 0.05
  231.                 scalerate 10.00
  232.                 velocity 4.00
  233.                 offsetalongaxis 7 0 0
  234.                 angles 0 0 crandom -30
  235.                 avelocity 0 0 crandom -30
  236.             )
  237.  
  238.             entry tagspawnlinked tag_barrel
  239.             (
  240.                 model muzsprite.spr
  241.                 color 1.00 1.00 1.00
  242.                 life 0.06
  243.                 scale 0.30
  244.                 velocity 3.00
  245.                 scalerate 10.00
  246.                 offsetalongaxis 3 0 0
  247.                 angles 0 0 crandom 400
  248.                 avelocity 0 0 crandom 300
  249.                 fade
  250.             )
  251.  
  252.             entry tagspawnlinked tag_barrel
  253.             (
  254.                 model muzsprite.spr
  255.                 color 1.00 1.00 1.00
  256.                 scale 0.30
  257.                 life 0.07
  258.                 scalerate 10.00
  259.                 offsetalongaxis 10 0 0
  260.                 fade
  261.             )
  262.  
  263.             entry tagspawn tag_barrel
  264.             (
  265.                 model vsssource2.spr
  266.                 alpha 0.13
  267.                 color 1.00 1.00 1.00
  268.                 spritegridlighting
  269.                 scale 0.10
  270. //                life 1.00
  271.                 life 0.30 //orig 1.0
  272.                 scalerate 7.00
  273.                 velocity 100.00
  274.                 accel 0.00 0.00 100.00
  275.                 friction 4.00
  276.                 offsetalongaxis range 23 -25 0 0
  277.                 scalemin 0.10
  278.                 scalemax 0.50
  279.                 fade
  280.                 randomroll
  281.             )
  282.  
  283.             // shell eject
  284.             entry commanddelay 0.1 tagspawn tag_eject
  285.             (
  286.                 spawnrange 2048
  287.                 count 1
  288.                 model models/ammo/pistolshell.tik
  289.                 velocity 50
  290.                 emitterangles 0 0 0
  291.                 randvel crandom 10 crandom 10 random 20
  292.                 avelocity crandom 90 crandom 90 0
  293.                 accel 0 0 -800
  294.                 physicsrate 20
  295.                 life 2.0
  296.                 fadedelay 1.7
  297.                 collision
  298.                 bouncefactor 0.2
  299.                 bouncesoundonce snd_pistol_shell
  300.             )
  301.  
  302.             // smoke puff
  303.             entry tagspawn tag_eject
  304.             (
  305.                 model vsssource2.spr
  306.                 alpha 0.10
  307.                 color 1.00 1.00 1.00
  308.                 spritegridlighting
  309.                 scale 0.10
  310. //                life 1.00
  311.                 life 0.30 //orig 1.0
  312.                 scalerate 7.00
  313.                 velocity 100.00
  314.                 accel 0.00 0.00 100.00
  315.                 friction 4.00
  316.                 offsetalongaxis range 13 -15 0 0
  317.                 scalemin 0.10
  318.                 scalemax 0.50
  319.                 fade
  320.                 randomroll
  321.             )
  322.         }
  323.     }
  324. }
  325.  
  326. /*QUAKED addon_playerweapon_allied_thompson (0.0 0.0 1.0) (-8 -8 -8) (8 8 8)
  327. Allied submachinegun - Thompson
  328. */